home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW etc / MPW-PR / Interfaces&Libraries / Interfaces / CIncludes / FSpio.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-24  |  2.3 KB  |  74 lines  |  [TEXT/MPS ]

  1.  
  2. /************************************************************
  3.  
  4.     FSpio.h
  5.     FSSpec versions of the standard input and output functions.
  6.  
  7.     Copyright Apple Computer,Inc.  1997
  8.     All rights reserved
  9.  
  10. ************************************************************/
  11.  
  12.  
  13. #ifndef __FSPIO__
  14. #define __FSPIO__
  15.  
  16. #include <ConditionalMacros.h>
  17. #include <stdio.h>
  18. #include <Files.h>
  19.  
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23.  
  24. #if PRAGMA_IMPORT_SUPPORTED
  25.     #pragma import on
  26. #endif
  27. /*
  28.  * Functions similar to those in <stdio.h>
  29.  */
  30. extern int FSp_remove (const FSSpec *spec);
  31.  
  32. /* For FSp_rename, "newname" must be a leaf name.  The file is renamed "in place". */
  33. extern int   FSp_rename (const FSSpec *spec, const char *newFName);
  34. extern FILE  *FSp_freopen (const FSSpec *spec, const char *mode, FILE *stream);
  35. extern FILE  *FSp_fopen (const FSSpec *spec, const char * open_mode);
  36. extern void  FSp_fsetfileinfo (const FSSpec *spec, unsigned long newcreator, unsigned long newtype);
  37.  
  38. /*
  39.  * Functions similar to those in <FCntl.h>
  40.  */
  41. extern int FSp_open(const FSSpec *spec, int oflag);
  42. extern int FSp_creat(const FSSpec *spec);
  43. extern int FSp_unlink(const FSSpec *spec);
  44. extern int FSp_faccess(const FSSpec *spec, unsigned int cmd, long *arg);
  45.  
  46. /*
  47.  * Alias utility functions similar to those in <IntEnv.h>
  48.  */
  49. extern OSErr FSMakeFSSpec_Long(char *source, Str255 nameBuffer, short initvRefNum, int initdirID, FSSpec *result);
  50. extern OSErr FSSpec2Path_Long (FSSpec theSpec, char *path, size_t pathSize);
  51.  
  52.  
  53. extern OSErr ResolveFolderAliases_Long (short volume, long directory, char *path, Str255 nameBuffer, Boolean resolveLeafName,
  54.                                         FSSpec *theSpec, Boolean *isFolder, Boolean *hadAlias, Boolean *leafIsAlias);
  55. extern OSErr MakeResolvedFSSpec_Long (short volume, long directory, char *path, Str255 buffer,
  56.                                       FSSpec *theSpec, Boolean *isFolder, Boolean *hadAlias, Boolean *leafIsAlias);
  57. extern OSErr ResolvePath_Long (char *rawPath, char *resolvedPath, Boolean *isFolder, Boolean *hadAlias, size_t resolvedPathSize);
  58. extern OSErr MakeResolvedPath_Long (short volume, long directory, char *path, Boolean resolveLeafAlias, char *buffer,
  59.                                     Boolean *isFolder, Boolean *hadAlias, Boolean *leafIsAlias,
  60.                                     size_t bufferSize);
  61.  
  62.  
  63. #if PRAGMA_IMPORT_SUPPORTED
  64.     #pragma import off
  65. #endif
  66.  
  67. #ifdef __cplusplus
  68. }
  69. #endif
  70.  
  71.  
  72.  
  73. #endif  /* __FSPIO__ */
  74.